<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .index{
            height: 100px;
            width: 100px;
            overflow-y: auto;
            background-color: #ff00ff;
            /* overflow: hidden; */
        }
        .index1{
            width: 80px;
            height: 120px;
            background-color: #ff0;
            /* white-space: pre-wrap; */
            overflow: auto;

        }
        /* .app {
            width: 100px;
            height: 100px;
            background-color: #f00;
        }

        .app1 {
            background-color: #ff0;
        } */
    </style>
</head>

<body>
    <div class="index">
       <div class="index1" ontouchmove='return false' >霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹霓虹</div>
    </div>
    <div class="app"></div>
    <!-- <button onclick="add()">添加</button> -->
    <span onclick="add()" >添加</span>
    <script>
        let oapp=document.getElementsByClassName('app')[0]
        console.log(oapp,'---------')
        let html1 = "<div class='app1'>添加的数据</div>"
        function add(){
            console.log(1)
            oapp.innerHTML=html1;
        }
    </script>
</body>

</html>